﻿using System;

namespace Diploma.Models
{
    public partial class Message : ISoftDeletable
    {
        #region ISoftDeletable Members

        public void MarkForDeletion()
        {
            Mark(true);
        }

        public void UnmarkFromDeletion()
        {
            Mark(false);
        }

        #endregion

        protected void Mark(bool asDeleted)
        {
            DeletionDate = asDeleted ? (DateTime?) DateTime.Now : null;
        }
    }
}